import { Image } from '@douyinfe/semi-ui';
import styles from "./index.module.scss";

export default function History({ onHistoryImageClick, videoHistoryList }) {

  return (
    <div className={styles.history}>
      {(videoHistoryList || []).map((item, index) => (
        <div
          key={item.historyId}
          className={styles.historyItem}
          onClick={() => onHistoryImageClick(index)}>
          <Image className={styles.img} src={item.firstFrameUrl} preview={false} draggable={false} />
        </div>
      ))}
    </div>
  );
}